<?php
echo "<div id='sidebar'>";
if(isset($_SESSION['members'])){
	if($_SESSION['members']['niveau_id'] >= 2){
		
		if(isset($_SESSION['myusername'])){
			
			// Zichtbaar voor medewerkers, werkgever en admin
			echo "PizzaRio Backend site<br />";
			echo "Welkom ". $_SESSION['myusername'] . "<br />";
			echo "<strong>Medewerkers</strong><br />";
			echo "<a href=\"back_end_bestellingen.php\">Bezorgingen</a><br />";		
			
			// Zichtbaar voor werkgever en admin
			if($_SESSION['members']['niveau_id'] >= 3){
				echo "<strong>Werkgever</strong><br />";
				echo "<a href=\"back_end_bestellingen.php\">Bestellingen</a><br />";				
				echo "<a href=\"Back_end_gegevens.php\">Member Gegevens</a><br />";
			}
				
			// Zichtbaar voor admin
			if($_SESSION['members']['niveau_id'] >= 4){
				echo "<strong>Admin</strong><br />";
				echo "<a href=\"back_end_bestellingen.php\">Bestellingen</a><br />";
				echo "<a href=\"Back_end_gegevens.php\">Member Gegevens</a><br />";			
			}			
			
			Echo "	<a href=\"../Logout.php\">Logout</a><br />";
			Echo "<a href=\"../index.php\">Front end</a><br />";
			
		}
	}	
}
else{
die();
}

echo "</div>";
	
?>